class Person:
    def __init__(self,name,sex,age,charge,brand,capacity,size,time,credits):
        self.name = name
        self.sex = sex
        self.age = age
        self.charge = charge
        self.brand = brand
        self.capacity = capacity
        self.size = size
        self.time = time
        self.credits = credits

    def message(self,info):
        print('短信内容是：{}'.format(info))

    def call(self, num,call_time):
      while True:
        if num == None :
            print('您拨打的号码是空号')
        elif self.charge < 1 :
            print('话费不足，请先充值')
        else:
            print('电话接通中')

            if 0 < call_time <=10 :
                deduct = 1 * call_time
                self.charge = self.charge - deduct
                self.credits = self.credits + 15 * call_time
                break
            elif 10 <call_time <= 20 :
                deduct = 0.8 * call_time
                self.charge = self.charge - deduct
                self.credits = self.credits + 39 * call_time
                break
            else:
                deduct = 0.65 * call_time
                self.charge = self.charge - deduct
                self.credits = self.credits + 48 * call_time
                break
      print('通话结束，扣费：{}元，话费剩余：{}元，积分：{}'.format(deduct,self.charge,self.credits))

p = Person(
    name='Lucy',
    sex = 'female',
    age = 20,
    charge = 66,
    brand = 'vivo',
    capacity =100 ,
    size = 50,
    time = 180,
    credits = 88
)

p.message('你好')
p.call(1234567890,5)